package com.xyz.domain.ext;

public enum  EnumUserOptLogType {

    BindWX("绑定微信",1),
    BindWxPayAccnt("绑定微信支付",2),
    BindAntPayAccnt("绑定支付宝",3),
    BindPhone("绑定手机号码",4),
    BindEmail("绑定邮箱",5);


    private String name;

    private Integer key;

    EnumUserOptLogType(String name, Integer key){
        this.name = name;
        this.key = key;
    }

    public EnumUserOptLogType getByKey(Integer key){
        for(EnumUserOptLogType source : EnumUserOptLogType.values()){
            if(source.getKey() == key){
                return source;
            }
        }
        return  null;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getKey() {
        return key;
    }

    public void setKey(Integer key) {
        this.key = key;
    }

}
